Commands that need to write files within the repo directory can call
this early to ensure the directory is writable for the current user.
If not, it fails with a helpful "You need to be root to perform this
command" message.
out:
return success;
}
+
+gboolean
+ostree_ensure_repo_writable (OstreeRepo *repo,
+ GError **error)
+{
+ gboolean ret;
+
+ ret = ostree_repo_is_writable (repo, error);
+
+ g_prefix_error (error, "Cannot write to repository: ");
+
+ return ret;
+}
+
int *argc, char ***argv,
OstreeSysroot **out_sysroot,
GCancellable *cancellable, GError **error);
+
+gboolean ostree_ensure_repo_writable (OstreeRepo *repo, GError **error);